<link href="./css/style.css" rel="stylesheet" type="text/css" />
<div class="main">
<div class="usereadd">
	<p class="tt"><a>首页</a>><a href="managerlist.php">管理员列表</a>><span>添加管理员</span></p>
	<form class="uedit">
		<input type="hidden" name="t1" value="{$info[auname]}">
		<p class="p2"><span>登录账户</span>{$info[auname]}</p>	
		<p class="p2"><span>登录密码</span><input type="password" name="t2" placeholder="不修改请留空" /></p>
		<p class="p2"><span>姓名</span><input type="text" name="t3" placeholder="请输入管理员姓名" value="{$info[atname]}" /></p>				
		<button type="button" onclick="madd();">立即添加</button>
	</form>
	<script src="./js/jquery.js"></script>
	<script>		
		function madd(){
				$.ajax({
					type:"post",
					dataType:"json",
					url:"/Moudel.php?m=m&a=medit",
					data:$(".uedit").serialize(),
					success:function(d){
						if(d[0]==0){
							alert(d[1]);
						}
						else{
							alert(d[1]);
							window.location.href='managerlist.php';
						}
					}
				});
			}
	</script>
	
</div>
</div>
<script>
	h1 = $(".main").height();
	h2 = $(".usereadd").height();
	if(h2>h1){
		$(".main").css("height","auto");
	}
</script>